package com.lottery.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lottery.common.model.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.List;

/**
* <p>
    * 用户评论表
    * </p>
*
* @author jobob
* @since 2019-11-01
*/
    @Data
    @Accessors(chain = true)
    @ApiModel(value="TbCommentInfo对象", description="用户评论表")
    @TableName("tb_comment_info")
    public class CommentInfo {

    private static final long serialVersionUID = 1L;

            @ApiModelProperty(value = "关联类型 0801短报 0802资讯")
    private String relationType;

            @ApiModelProperty(value = "关联id")
    private Long relationId;

    private LocalDateTime createTime;

            @ApiModelProperty(value = "评论内容")
    private String comment;

    private Long memberId;

            @ApiModelProperty(value = "昵称")
    private String nickName;
    @TableField(exist=false)
    @ApiModelProperty(value = "子评论")
    private List<CommentSubInfo> commentSub;


    public CommentInfo() {
    }


    public CommentInfo(String relationType, Long relationId, String comment, Long memberId, String nickName) {
        this.relationType = relationType;
        this.relationId = relationId;
        this.comment = comment;
        this.memberId = memberId;
        this.nickName = nickName;
    }
}
